<template>
<div id="box">
  <div v-for="n in 5" @click="Select(n)" :class="{'on':cur>=n}"></div>
</div>
</template>

<script>
export default {
  name: "Stars",
  data(){
    return{
      cur:-1
    }
  },
  methods: {
    Select: function(n) {
      this.cur = n;
    }
  }
}
</script>

<style scoped>

</style>
